/*
 * Abstract out the musical information for the Sun SPOT orchestra mini-project.
 */

package org.sunspotworld.demo;

/**
 * 
 * @author Kurt
 */
public class AudioInfo {
    /*
     * Note frequency for the base of the scale.
     */
    int m_scaleNote;
    
    /*
     * How long notes last (in ms?).
     */
    int m_noteDuration;
    
    /*
     * Note duty cycle, as percentage of the note duration.
     */
    int m_noteDutyCycle;
    
    /*
     * Enumeration for the different types of scales.
     */
    public class ScaleTypes {
        public static final int MAJOR = 0;
        public static final int MINOR = 1;
        public static final int CDED = 2;
        private int currentType = 0;

        public void set(int v){
            currentType = v;
            }
        };
    
    /*
     * Scale type.
     */
    ScaleTypes m_scaleType = new ScaleTypes();
    
    /*
     * Default constructor.
     */
    AudioInfo() {
        m_scaleNote = 0;
        m_noteDuration = 0;
        m_noteDutyCycle = 0;
        m_scaleType.set(ScaleTypes.MAJOR);
    }
    
    public int getScaleNote() {
        return m_scaleNote;
    }
    
    public void setScaleNote(int scaleNote) {
        m_scaleNote = scaleNote;
    }
    
    public int getNoteDuration() {
        return m_noteDuration;
    }
    
    public void setNoteDuration(int noteDuration) {
        m_noteDuration = noteDuration;
    }
    
    public int getNoteDutyCycle() {
        return m_noteDutyCycle;
    }
    
    public void setNoteDutyCycle(int noteDutyCycle) {
        m_noteDutyCycle = noteDutyCycle;
    }
    
    public ScaleTypes getScaleType() {
        return m_scaleType;
    }
}
